<template>
  <div class="shopInfo">
     <div class="logo">
       <img :src="shop.logo" alt="">
       <div>{{shop.name}}</div>
     </div>
    <div>
      <div class="count">
        <div>{{shop.sells|showCOuntFilter}}</div>
        <div>总销量</div>
      </div>
      <div class="good">
        <div>{{shop.goodsCount}}</div>
        <div>全部宝贝</div>
      </div>
      <div class="miaoshu">
         <div v-for="item in shop.score">
            <div>{{item.name}}{{"  "+item.score}}<span :class="{beijing:item.isBetter}">{{item.isBetter?"高":"低"}}</span></div>
         </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "ShopInfo",
    props:{
      shop:{
        type:Object
      }
    },
    filters: {
      showCOuntFilter:function (value) {
        if(value<10000) return value;
        if(value>10000) return  (value/10000).toFixed(1)+"万"
      }
    }
  }
</script>

<style scoped>
 .logo{
  margin-top: 10px;
   width: 100%;
   height: 70px;
   line-height: 70px;
   padding-left: 10px;
 }
.logo img{
  display: inline-block;
  width: 70px;
  height: 70px;
  float: left;
  margin-right: 10px;

}
.logo div{
  float: left;
}
.shopInfo{
  position: relative;
  padding-bottom: 100px;
}
.count{
  position: absolute;
  left: 30px;
  padding-top: 20px;
}
.count div:nth-of-type(1){
  padding-bottom: 3px;
  font-size:20px ;
}
 .good{
    position: absolute;
    left: 100px;
    padding-top: 20px;

  }
 .good div:nth-of-type(1){
   padding-bottom: 3px;
   font-size:20px ;
   text-align: center;
 }
.miaoshu{
  padding-top: 10px;
  position: absolute;
  right: 50px;
}
.miaoshu div{
  padding-bottom: 4px;
}
 .miaoshu div span{
     position: absolute;
    right: -30px;
 }
 .beijing{
   padding: 4px;
   border-radius: 50%;
   background-color: #ff8198;
  }
</style>
